﻿using System;
using System.ServiceModel.Activation;
using System.Web;
using System.Web.Routing;
using D3DSS.IoC;

namespace D3DSS.Service
{
    public class Global : HttpApplication
    {
        void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes();
            BootStrapper.ConfigureStructureMap();
        }

        private void RegisterRoutes()
        {
            RouteTable.Routes.Add(new ServiceRoute("DropStatistics", new SecureIoCWebServiceHostFactory(), typeof(DropStatisticsService)));
            RouteTable.Routes.Add(new ServiceRoute("Account", new IoCWebServiceHostFactory(), typeof(AccountService)));
            RouteTable.Routes.Add(new ServiceRoute("Update", new IoCWebServiceHostFactory(), typeof(UpdateService)));
        }
    }
}
